const Handlebars = require('handlebars')
const template = `
const map = {
    {{#each data}}
      {{this.name}}: {{this.value}}
    {{/each}}
  }`
const renderTemplate = (template, data) => {
  return Handlebars.compile(template)(data)
}
const data = {
  data: [{ name: 1, value: 'function(){}' }],
}
const res = renderTemplate(template, data)

